﻿/*：
 脚本功能：武器箱子（转职赠送）
 */


function start() {
    if (cm.getSpace(1) >= 5 && cm.getSpace(2) >= 4 && cm.getLevel() >= 10) {
        cm.gainItem(2433509, -1);
        Gift(cm.getJob());
        cm.playerMessage(-1, "送给你道具，请你好好保存。");
        cm.playerMessage(5, "送给你道具，请你好好保存。");
        cm.playerMessage(1,"获得专属武器！");
        cm.dispose();
    } else {
        cm.playerMessage(-1, "请让你的背包都充裕,等级达到10级后使用。");
        cm.sendOk("请保证背包空间充足；10级、30级、70级、100级时可以获得不同武器。");
        cm.dispose();
    }
    cm.dispose();
}

function Gift(job) {
    switch (job) {
        case 100: //战士        
            cm.gainItem(1302135, 1); //挑战之单手剑 - 10级
            cm.gainItem(1312049, 1) //挑战之单手斧 - 10级
            cm.gainItem(1322077, 1); //挑战之单手钝器 - 10级
            break;
        case 1100: //魂骑士

        case 5100: //米哈尔
            cm.gainItem(1302036, 1); //枫叶旗 单手剑
            break;
        case 5110:
            cm.gainItem(1302075, 1); //新加坡旗30 单手剑
            break;
        case 5111:
            cm.gainItem(1302209, 1); //枫叶突击剑60 单手剑
            break;
        case 5112:
            cm.gainItem(1302237, 1); //紫爆炎剑100 单手剑
            break;

        case 110:
        case 1110:
        case 6110:
            cm.gainItem(1402044, 1); //南瓜灯 双手剑 - 30级
            break;
        case 1111:

        case 111:
        case 6111:
            cm.gainItem(1402013, 1); //白日剑 双手剑 - 50级
            break;
        case 112:
        case 1112:
        case 6112:
            cm.gainItem(1402252, 1);//黑色双手剑 双手剑 - 100级
            break;
        case 120:
            cm.gainItem(1422065, 1);//纯白之爱天使之光(双手钝器)
            break;
        case 121:
            cm.gainItem(1422157, 1);//游泳圈
            break;
        case 122:
            cm.gainItem(1422185, 1);//100黑色锤子
            break;
        case 130:
            cm.gainItem(1432013, 1);//南瓜枪 30
            break;
        case 131:
            cm.gainItem(1432022, 1);//银龙枪  60
            break;
        case 132:
            cm.gainItem(1432105, 1);//传说红莲落神枪 100
            break;
        case 1200:
        case 200:
            cm.gainItem(1372043, 1);
            break;
        case 1210:
        case 210:
            cm.gainItem(1372046, 1);//圣诞六翼天使武器(短杖)
            break;
        case 1211:
        case 211:
            cm.gainItem(1372073, 1);//扎昆树枝 60级
            break;
        case 1212:
        case 212:
            cm.gainItem(1372139, 1);//枫叶短仗 100
            break;
        case 220:
            cm.gainItem(1372046, 1);//圣诞六翼天使武器(短杖)
            break;
        case 221:
            cm.gainItem(1372073, 1);//扎昆树枝 60级
            break;
        case 222:
            cm.gainItem(1372139, 1);//枫叶短仗 100
            break;
        case 230:
            cm.gainItem(1372046, 1);//圣诞六翼天使武器(短杖)
            break;
        case 231:
            cm.gainItem(1372073, 1);//扎昆树枝 60级
            break;
        case 232:
            cm.gainItem(1372139, 1);//枫叶短仗 100
            break;
        case 1300:
        case 3300:
        case 300:
            cm.gainItem(1452093, 1);
            cm.gainItem(1462078, 1);
            cm.gainItem(2060000, 2000); //弓矢
            cm.gainItem(2061000, 2000); //弩矢
            break;
        case 1310:
        case 310:
            cm.gainItem(1462004, 1);//鹰弩
            break;
        case 1311:
        case 311:
            cm.gainItem(1452023, 1);
            break;
        case 1312:
        case 312:
            cm.gainItem(1452101, 1);
            break;
        case 3310:
            cm.gainItem(1462004, 1);//鹰弩
            break;
        case 320:
            cm.gainItem(1462000, 1);
            break;
        case 3311:
            cm.gainItem(1462040, 1);//4周年枫叶击星弩 60级
            break;
        case 321:
            cm.gainItem(1462040, 1);//4周年枫叶击星弩 60级
            break;
        case 3312:
            cm.gainItem(1462090, 1);//最终不速之客十字弓 100级
            break;
        case 322:
            cm.gainItem(1462090, 1);//最终不速之客十字弓 100级
            break;
        case 1400:
        case 400:
            cm.gainItem(1332063, 1); //短刀
            cm.gainItem(1472061, 1); //拳套
            cm.gainItem(2070011, 10000); //枫叶标
            break;
        case 1410:
        case 410:
            cm.gainItem(1472008, 1);
            break;
        case 1411:
        case 411:
            cm.gainItem(1472037, 1);
            break;
        case 1412:
        case 412:
            cm.gainItem(1472053, 1);
            break;
        case 420:
            cm.gainItem(1332012, 1);
            break;
        case 421:
            cm.gainItem(1332036, 1);
            break;
        case 422:
            cm.gainItem(1332052, 1);
            break;
        case 430: //20
            cm.gainItem(1342000, 1);
            cm.gainItem(1332008, 1)
            break;
        case 431: //30
            cm.gainItem(1342001, 1);
            cm.gainItem(1332009, 1);
            break;
        case 432: //45
            cm.gainItem(1342002, 1);
            cm.gainItem(1332014, 1)
            break;
        case 433: //60
            cm.gainItem(1342004, 1);
            cm.gainItem(1332015, 1);
            break;
        case 434: //100
            cm.gainItem(1342008, 1);
            cm.gainItem(1332052, 1);
            break;
        case 1500:
            cm.gainItem(1482066, 1)
            break;
        case 500:
            cm.gainItem(1492066, 1);
            cm.gainItem(1482066, 1);
            cm.gainItem(2330000, 2000); //银子弹
            break;
        case 3500:
            cm.gainItem(1492066, 1);
            break;
        case 1510:
        case 510:
            cm.gainItem(1482004, 1);//冲锋队长 全覆式拳甲 30级
            break;
        case 1511:
        case 511:
            cm.gainItem(1482022, 1);//冲锋队长 4周年枫叶金爪 60级
            break;
        case 1512:
        case 512:
            cm.gainItem(1482078, 1); //冲锋队长 最终不速之客指套 100级
            break;
        case 3510:
            cm.gainItem(1492069, 1);
            break;
        case 520:
            cm.gainItem(1492069, 1);
            break;
        case 3511:
            cm.gainItem(1492072, 1);
            break;
        case 521:
            cm.gainItem(1492072, 1);
            break;
        case 3512:
            cm.gainItem(1492074, 1);
            break;
        case 522:
            cm.gainItem(1492074, 1)
            break; //冒险家、骑士团 机械师 豹弩游侠 部分完成
        case 508: //龙的传人
            cm.gainItem(1492066, 1);
            cm.gainItem(2330003, 2000); //银子弹
            break;
        case 570:
            cm.gainItem(1492069, 1);
            break;
        case 571:
            cm.gainItem(1492072, 1);
            break;
        case 572: //龙的传人结束
            cm.gainItem(1492074, 1)
            break;
        case 2100:
            cm.gainItem(1442096, 1);
            break;
        case 2110:
            cm.gainItem(1442099, 1);
            break;
        case 2111:
            cm.gainItem(1442102, 1);
            break;
        case 2112:
            cm.gainItem(1442105, 1);
            break; //战神部分完成
        case 2300:
            cm.gainItem(1522000, 1);
            cm.gainItem(1352000, 1);
            break;
        case 2310:
            cm.gainItem(1522004, 1);
            cm.gainItem(1352001, 1);
            break;
        case 2311:
            cm.gainItem(1522008, 1);
            cm.gainItem(1352002, 1);
            break;
        case 2312:
            cm.gainItem(1522012, 1);
            cm.gainItem(1352003, 1);
            break; //双弩部分完成
        case 2400:
            cm.gainItem(1362000, 1);
            cm.gainItem(1352100, 1);
            break;
        case 2410:
            cm.gainItem(1362005, 1);
            cm.gainItem(1352101, 1);
            break;
        case 2411:
            cm.gainItem(1362009, 1);
            cm.gainItem(1352102, 1);
            break;
        case 2412:
            cm.gainItem(1362013, 1);
            cm.gainItem(1352103, 1);
            break; //幻影部分完成
        case 2700:
            cm.gainItem(1212001, 1);
            break;
        case 2710:
            cm.gainItem(1212002, 1);
            break;
        case 2711:
            cm.gainItem(1212004, 1);
            break;
        case 2712:
            cm.gainItem(1212007, 1);
            break; //TODO 夜光部分 自动穿戴宝珠
        case 3100: //恶魔猎手
            cm.gainItem(1322122, 1);
            break;
        case 3110:
            cm.gainItem(1322124, 1);
            break;
        case 3111:
            cm.gainItem(1322126, 1);
            break;
        case 3112:
            cm.gainItem(1322127, 1);
            break;
        case 3200: //唤灵法师
            cm.gainItem(1382085, 1);
            break;
        case 3210:
            cm.gainItem(1382088, 1);
            break;
        case 3211:
            cm.gainItem(1382091, 1);
            break;
        case 3212:
            cm.gainItem(1382094, 1);
            break;
        case 3600: //尖兵
            cm.gainItem(1242001, 1);
            break;
        case 3610:
            cm.gainItem(1242002, 1);
            break;
        case 3611:
            cm.gainItem(1242004, 1);
            break;
        case 3612:
            cm.gainItem(1242008, 1);
            break; //尖兵结束
        case 6100: //狂龙战士
            cm.gainItem(1402177, 1);
            break;
        case 6500:
            cm.gainItem(1222001, 1);
            break;
        case 6510:
            cm.gainItem(1222002, 1);
            break;
        case 6511:
            cm.gainItem(1222004, 1);
            break;
        case 6512:
            cm.gainItem(1222008, 1);
            break;
        case 3101:
            cm.gainItem(1232001, 1);
            break;
        case 3120:
            cm.gainItem(1232002, 1);
            break;
        case 3121:
            cm.gainItem(1232004, 1);
            break;
        case 3122:
            cm.gainItem(1232008, 1);
            break;
        case 501: //火炮手
            cm.gainItem(1532045, 1);
            break;
        case 530:
            cm.gainItem(1532049, 1);
            break;
        case 531:
            cm.gainItem(1532053, 1);
            break;
        case 532:
            cm.gainItem(1532057, 1);
            break;
        case 2500:
            cm.gainItem(1482066, 1);
            cm.gainItem(1353100, 1);
            break;
        case 2510:
            cm.gainItem(1482069, 1);
            cm.gainItem(1353101, 1);
            break;
        case 2511:
            cm.gainItem(1482072, 1);
            cm.gainItem(1353102, 1);
            break;
        case 2512:
            cm.gainItem(1482074, 1);
            cm.gainItem(1353103, 1);
            break;

        case 3700:
	    cm.gainItem(1582000, 1);//10级武器
	    cm.gainItem(1353400, 1);//10级副武器
	    cm.gainItem(2330000, 2000);//子弹
            break;
        case 3710:
	    cm.gainItem(1582001, 1);//30级武器
	    cm.gainItem(2330000, 2000);//子弹
            break;
        case 3711:
	    cm.gainItem(1582003, 1);//60级武器
            break;
        case 3712:
	    cm.gainItem(1582008, 1);//110级武器
	    cm.gainItem(1353404, 1);//100级副武器
	    cm.gainItem(2330003, 10000);//银子弹
            break;

        case 4100:
            cm.gainItem(1542000, 1);
            break;
        case 4110:
            cm.gainItem(1542002, 1);
            break;
        case 4111:
            cm.gainItem(1542005, 1);
            break;
        case 4112:
            cm.gainItem(1542009, 1);
            break;
        case 4200:
            cm.gainItem(1552000, 1);// 铁扇
            break;
        case 4210:
            cm.gainItem(1552002, 1);
            break;
        case 4211:
            cm.gainItem(1552005, 1);
            break;
        case 4212:
            cm.gainItem(1552009, 1);
            break;
        case 14200:
            cm.gainItem(1353200, 1);
            break;
        case 14210:
            cm.gainItem(1262001, 1);
            cm.gainItem(1353201, 1);
            break;
        case 14211:
            cm.gainItem(1262003, 1);
            cm.gainItem(1353202, 1);
            break;
        case 14212:
            cm.gainItem(1262007, 1);
            cm.gainItem(1353203, 1);
	    break;
	case 11212://林之灵
	    cm.gainItem(1252053,1);//60级
	    break;
	case 15200://圣晶使徒
	    cm.gainItem(1282000,1);//10级
	    cm.gainItem(1353500,1);//副武器
	    break;
	case 15210://圣晶使徒
	    cm.gainItem(1282001,1);//30级
	    break;
	case 15211://圣晶使徒
	    cm.gainItem(1282003,1);//60级
	    cm.gainItem(1353502,1);//副武器
	    break;
	case 15212://圣晶使徒
	    cm.gainItem(1282007,1);//100级
	    break;
	case 6400://魔影链士
	    cm.gainItem(1272000,1);//10级
	    cm.gainItem(1353300,1);//副武器
	    break;
	case 6410://魔影链士
	    cm.gainItem(1272001,1);//30级
	    break;
	case 6411://魔影链士
	    cm.gainItem(1272003,1);//60级
	    cm.gainItem(1353302,1);//副武器
	    break;
	case 6412://魔影链士
	    cm.gainItem(1272019,1);//100级
	    break;



    }
}
/*
 * 
 * <imgdir name="5620000">
<string name="name" value="双刀风暴 20 精通"/>
<string name="desc" value="便于“暗影双刀”职业在4转前都能顺利转职的特别卷轴。有100%的概率将#c双刀风暴#的最高等级提升到20级，且使用后#c技能等级直接提高1级#。\n职业：双刀客 \n条件:技能等级5以上 \n#c每个角色只能使用1次"/>
</imgdir>
<imgdir name="5620001">
<string name="name" value="暗影飞跃斩 20 精通"/>
<string name="desc" value="便于“暗影双刀”职业在4转前都能顺利转职的特别卷轴。有100%的概率将#c暗影飞跃斩#的最高等级提升到20级，且使用后#c技能等级直接提高1级#。\n职业：血刀 \n条件:技能等级5以上 \n#c每个角色只能使用1次"/>
</imgdir>
<imgdir name="5620002">
<string name="name" value="镜像分身 20 精通"/>
<string name="desc" value="便于“暗影双刀”职业在4转前都能顺利转职的特别卷轴。有100%的概率将#c镜像分身#的最高等级提升到20级，且使用后#c技能等级直接提高1级#。\n职业：血刀 \n条件:技能等级10以上 \n#c每个角色只能使用1次"/>
</imgdir>
<imgdir name="5620003">
<string name="name" value="影子闪避 20 精通"/>
<string name="desc" value="便于“暗影双刀”职业在4转前都能顺利转职的特别卷轴。有100%的概率将#c影子闪避#的最高等级提升到20级，且使用后#c技能等级直接提高1级#。\n职业：血刀 \n条件:技能等级10以上\n#c每个角色只能使用1次"/>
</imgdir>
 */